home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hardcore Visual Basic 5.0 (2nd Edition)
/
Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso
/
Code
/
Goodies
/
NAMESP~1
/
DDTREE.FR_
/
DDTREE.FR
Wrap
Text File
|
1997-06-04
|
6KB
|
183 lines
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Object = "{688EB628-7DA2-11D0-95F0-0020AF07755A}#1.1#0"; "awddtree.ocx"
Begin VB.MDIForm mdiDemo
BackColor = &H8000000C&
Caption = "Acuteware DropDownTree Control Demo"
ClientHeight = 6840
ClientLeft = 60
ClientTop = 345
ClientWidth = 7950
Icon = "DDTree.frx":0000
LinkTopic = "MDIForm1"
LockControls = -1 'True
Begin VB.PictureBox picTitle
Align = 1 'Align Top
BorderStyle = 0 'None
Height = 1335
Left = 0
ScaleHeight = 1335
ScaleWidth = 7950
TabIndex = 0
Top = 0
Width = 7950
Begin AWDDTREE.DDTree ddtSelect
Height = 330
Left = 840
TabIndex = 1
Top = 900
Width = 6915
_ExtentX = 12197
_ExtentY = 582
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label lblMenu
Caption = "&Menu:"
Height = 195
Left = 180
TabIndex = 3
Top = 960
Width = 555
End
Begin ComctlLib.ImageList imlMenu
Left = 6540
Top = 900
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 128
_Version = 327680
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 3
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "DDTree.frx":000C
Key = "Info"
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "DDTree.frx":011E
Key = "Exit"
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "DDTree.frx":0230
Key = "Sample"
EndProperty
EndProperty
End
Begin VB.Label lblTitle
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Caption = "Acuteware DropDownTree"
BeginProperty Font
Name = "Arial"
Size = 24
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 675
Left = 180
TabIndex = 2
Top = 120
Width = 7575
End
End
End
Attribute VB_Name = "mdiDemo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub ddtSelect_Click()
Call ShowForm(ddtSelect.SelectedItem.Key)
End Sub
Private Sub ShowForm(sName$)
Dim frm As Form
Dim frmPrev As Form
Select Case sName
Case "frmIntro": Set frm = frmIntro
Case "frmSample1": Set frm = frmSample1
Case "frmSample2": Set frm = frmSample2
Case "frmSample3": Set frm = frmSample3
Case "frmSample4": Set frm = frmSample4
Case "frmSample5": Set frm = frmSample5
Case "Exit"
Unload Me
Exit Sub
End Select
If frm Is Nothing Then Exit Sub
' If Not Me.ActiveForm Is Nothing Then
' Unload Me.ActiveForm
' End If
Screen.MousePointer = vbHourglass
frm.Show
frm.ZOrder
Screen.MousePointer = vbDefault
End Sub
Private Sub MDIForm_Load()
Me.Move 0, 0
Set ddtSelect.ImageList = imlMenu
With ddtSelect.Nodes
With .Add(, , "frmIntro", "Introduction", "Info")
.Expanded = True
End With
Call .Add("frmIntro", tvwChild, "frmSample1", "Sample 1: Add Images to DropDown Lists", "Sample")
Call .Add("frmIntro", tvwChild, "frmSample2", "Sample 2: Group Items", "Sample")
Call .Add("frmIntro", tvwChild, "frmSample3", "Sample 3: ModeDrive; A DriveListBox with New Look", "Sample")
Call .Add("frmIntro", tvwChild, "frmSample4", "Sample 4: ModePath; Browsing Drives and Parent Directories", "Sample")
Call .Add("frmIntro", tvwChild, "frmSample5", "Sample 5: ModeNameSpace; The Explorer DropDown", "Sample")
Call .Add(, , "Exit", "Exit this demo", "Exit")
End With
Set ddtSelect.SelectedItem = ddtSelect.Nodes(1)
Call ShowForm("frmIntro")
ddtSelect.SetFocus
End Sub
Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
ddtSelect.ShowAbout
End Sub
Private Sub MDIForm_Resize()
Static xbSizing As Boolean
If xbSizing Then Exit Sub
xbSizing = True
On Error Resume Next
If Height <> 7245 Then Height = 7245
If Width <> 8070 Then Width = 8070
xbSizing = False
End Sub
Private Sub picTitle_Resize()
Dim y As Single
Dim w As Single
y = picTitle.ScaleWidth - 180
w = y - lblTitle.Left
If w < 0 Then w = 0
lblTitle.Width = w
w = y - ddtSelect.Left
If w < 0 Then w = 0
ddtSelect.Width = w
End Sub